package com.hrms.common.utils;


public class ResultMessage<T> {
    public static final int Success = 200;
    public static final int Error = 202;
    public static final int Warnning = 203;
    public static final int NO_AUTHORITY = 204;
    public static final int AUTH_FAIL = 210;
    public static final int JWT_AUTH_FAIL = 211;
    public static final int JWT_AUTH_FAIL_SIGNATURE = 212;
    public static final int JWT_AUTH_FAIL_EXPIRED = 213;
    private int result = 1;
    private String message = "";
    private T data;

    public ResultMessage() {
    }

    public ResultMessage(int result, String message) {
        this.result = result;
        this.message = message;
    }

    public ResultMessage(int result, String message, Object data) {
        this.result = result;
        this.message = message;
        this.data = (T) data;
    }


    public int getResult() {
        return this.result;
    }

    public void setResult(int result) {
        this.result = result;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return this.data;
    }

    public void setData(T data) {
        this.data = data;
    }
}

